package realestate.flat;

import realestate.entity.Flat;
import realestate.manager.object.IRAManager;
import realestate.manager.object.RequestManager;
import realestate.manager.request.IRequest;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 20.04.11
 * Time: 10:38
 * To change this template use File | Settings | File Templates.
 */
@Stateless(name = "FlatCityManager")
@Remote(value = IRAManager.class)
public class FlatManager extends RequestManager<Flat> {

	@PersistenceContext(name = "RealEstate")
	private EntityManager em;


	@Override
	public EntityManager getEntityManager() {
		return em;
	}

	@Override
	public Class<Flat> getOperateClass() {
		return Flat.class;
	}

	@Override
	public IRequest buildRequest() {
		return new FlatRequest();
	}
}
